<html>
<head>
<title>Fix for 13636</title>
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
    }
    
    function outputAppletsLength() {
        document.write("<p>");
        if (document.applets)
            document.write("Applets length is currently " + document.applets.length); 
        else
            document.write("There is no applets collection yet");
        document.write("</p>");
    }
    
</script>
</head>
<body>
<p>This test demonstrates a couple of object tags being added that do not contain Java applets.  Previously these Object element would be included in the document.applets collection even though the spec says that collection should contain only Applet elements and Object elements that contain applets.</p>
<p>As the document is parsed, javascript will output the size of the document.applets collection after each Object tag is inserted into the document.  For this test the count should always be zero.</p>
<p>Tragically we cannot have any actual Java Applets referenced here because when DRT loads the Java VM it hangs.  If that bug is resolved this test should also be amended to add a dummy Applet using both the Applet tag and a few different uses of the Object tag.</p>

<script>outputAppletsLength();</script>

<object type="application/not-a-real-applet" width=500 height=50>
<param name="code" value="ZOMG.class">
<param name="text" value="ZOMG OBJECT JAVA APPLET (but not really!)">
</object>

<script>outputAppletsLength();</script>

<object width=500 height=50>
Nothing here!
</object>

<script>outputAppletsLength();</script>

<object data="w3c_main.png" type="image/png">
</object>

<script>outputAppletsLength();</script>

</body>
</html>
